\(\int \cos (c+d x) (A+C \sec ^2(c+d x)) \, dx\) [8]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 19, antiderivative size = 24 \[ \int \cos (c+d x) \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {C \text {arctanh}(\sin (c+d x))}{d}+\frac {A \sin (c+d x)}{d} \]

[Out]

C*arctanh(sin(d*x+c))/d+A*sin(d*x+c)/d

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {4130, 3855} \[ \int \cos (c+d x) \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {A \sin (c+d x)}{d}+\frac {C \text {arctanh}(\sin (c+d x))}{d} \]

[In]

Int[Cos[c + d*x]*(A + C*Sec[c + d*x]^2),x]

[Out]

(C*ArcTanh[Sin[c + d*x]])/d + (A*Sin[c + d*x])/d

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 4130

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*(csc[(e_.) + (f_.)*(x_)]^2*(C_.) + (A_)), x_Symbol] :> Simp[A*Cot[e
+ f*x]*((b*Csc[e + f*x])^m/(f*m)), x] + Dist[(C*m + A*(m + 1))/(b^2*m), Int[(b*Csc[e + f*x])^(m + 2), x], x] /
; FreeQ[{b, e, f, A, C}, x] && NeQ[C*m + A*(m + 1), 0] && LeQ[m, -1]

Rubi steps \begin{align*} \text {integral}& = \frac {A \sin (c+d x)}{d}+C \int \sec (c+d x) \, dx \\ & = \frac {C \text {arctanh}(\sin (c+d x))}{d}+\frac {A \sin (c+d x)}{d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.46 \[ \int \cos (c+d x) \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {C \text {arctanh}(\sin (c+d x))}{d}+\frac {A \cos (d x) \sin (c)}{d}+\frac {A \cos (c) \sin (d x)}{d} \]

[In]

Integrate[Cos[c + d*x]*(A + C*Sec[c + d*x]^2),x]

[Out]

(C*ArcTanh[Sin[c + d*x]])/d + (A*Cos[d*x]*Sin[c])/d + (A*Cos[c]*Sin[d*x])/d

Maple [A] (verified)

Time = 0.10 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.25

method result size
derivativedivides \(\frac {A \sin \left (d x +c \right )+C \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) \(30\)
default \(\frac {A \sin \left (d x +c \right )+C \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) \(30\)
parallelrisch \(\frac {A \sin \left (d x +c \right )-C \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+C \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}\) \(43\)
risch \(-\frac {i A \,{\mathrm e}^{i \left (d x +c \right )}}{2 d}+\frac {i A \,{\mathrm e}^{-i \left (d x +c \right )}}{2 d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{d}\) \(71\)
norman \(\frac {-\frac {2 A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {2 A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )}+\frac {C \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}-\frac {C \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}\) \(101\)

[In]

int(cos(d*x+c)*(A+C*sec(d*x+c)^2),x,method=_RETURNVERBOSE)

[Out]

1/d*(A*sin(d*x+c)+C*ln(sec(d*x+c)+tan(d*x+c)))

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.67 \[ \int \cos (c+d x) \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {C \log \left (\sin \left (d x + c\right ) + 1\right ) - C \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, A \sin \left (d x + c\right )}{2 \, d} \]

[In]

integrate(cos(d*x+c)*(A+C*sec(d*x+c)^2),x, algorithm="fricas")

[Out]

1/2*(C*log(sin(d*x + c) + 1) - C*log(-sin(d*x + c) + 1) + 2*A*sin(d*x + c))/d

Sympy [F]

\[ \int \cos (c+d x) \left (A+C \sec ^2(c+d x)\right ) \, dx=\int \left (A + C \sec ^{2}{\left (c + d x \right )}\right ) \cos {\left (c + d x \right )}\, dx \]

[In]

integrate(cos(d*x+c)*(A+C*sec(d*x+c)**2),x)

[Out]

Integral((A + C*sec(c + d*x)**2)*cos(c + d*x), x)

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.58 \[ \int \cos (c+d x) \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {C {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 2 \, A \sin \left (d x + c\right )}{2 \, d} \]

[In]

integrate(cos(d*x+c)*(A+C*sec(d*x+c)^2),x, algorithm="maxima")

[Out]

1/2*(C*(log(sin(d*x + c) + 1) - log(sin(d*x + c) - 1)) + 2*A*sin(d*x + c))/d

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.67 \[ \int \cos (c+d x) \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {C \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) - C \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right ) + 2 \, A \sin \left (d x + c\right )}{2 \, d} \]

[In]

integrate(cos(d*x+c)*(A+C*sec(d*x+c)^2),x, algorithm="giac")

[Out]

1/2*(C*log(abs(sin(d*x + c) + 1)) - C*log(abs(sin(d*x + c) - 1)) + 2*A*sin(d*x + c))/d

Mupad [B] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.92 \[ \int \cos (c+d x) \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {A\,\sin \left (c+d\,x\right )+C\,\mathrm {atanh}\left (\sin \left (c+d\,x\right )\right )}{d} \]

[In]

int(cos(c + d*x)*(A + C/cos(c + d*x)^2),x)

[Out]

(A*sin(c + d*x) + C*atanh(sin(c + d*x)))/d